<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>
<?php session_start(); ?>
<!-- Scripts JavaScript-->
<?php
	$baseUrl = Yii::app()->baseUrl; 
	$cs = Yii::app()->getClientScript();
	
	
	$cs->registerScriptFile($baseUrl.'/js/jquery-1.9.0.min.js');
	$cs->registerScriptFile($baseUrl.'/js/jquery.nivo.slider.js');
	$cs->registerScriptFile($baseUrl.'/js/gallery.js');	
	
	
	
	$cs->registerScriptFile($baseUrl.'/js/jquery-1.4.4.min.js');
	$cs->registerScriptFile($baseUrl.'/js/jquery.reveal.js');
	
	
	
	
	//Import CSS
	$cs->registerCssFile($baseUrl.'/css/default/default.css');
	$cs->registerCssFile($baseUrl.'/css/nivo-slider.css');
	$cs->registerCssFile($baseUrl.'/css/reveal.css');
?>
<script>
	var $j=jQuery.noConflict();
</script>
<div class="form"><!--
	<div id="login">


		<?php $form=$this->beginWidget('CActiveForm', array(
				'id'=>'index-form',
				'enableClientValidation'=>false,
				'clientOptions'=>array(
						'validateOnSubmit'=>false,
				),
		)); ?>

			<?php echo $form->errorSummary($model); ?>

			<div class="row">
				<h3>
				<?php echo"Ingrese a su Cuenta"; ?>
				</h3>
			</div>
			<?php  $models = StkUsuario::model()->findAll();?>
			<div class="row">
					<?php //echo $form->labelEx($model,'username'); ?>
					<?php echo $form->textField($model,'username',array('class'=>'log-fields', 'value'=>'Usuario','onblur'=>"if (this.value=='') this.value = 'Usuario'", 'onfocus'=>"if (this.value=='Usuario') this.value = ''", 'style'=>'width:100%; margin-left:-2%;')); ?>
					<?php echo $form->error($model,'username'); ?>
			</div>

			<div class="row">
				<?php //echo $form->labelEx($model,'password'); ?>
				<?php echo $form->passwordField($model,'password',array('class'=>'log-fields','value'=>'Contrase�a', 'onblur'=>"if (this.value=='') this.value = 'Contrase�a'", 'onfocus'=>"if (this.value=='Contrase�a') this.value = ''", 'style'=>'width:100%; margin-left:-2%;')); ?>
				<?php echo $form->error($model,'password'); ?>
			</div>
		
			<div class="log-button" id="button" >
				<?php echo CHtml::submitButton('Entrar>>', array('class'=>'log-button')); ?>
			</div>
		<?php $this->endWidget(); ?>
		<a href="#">&iquest;Olvid&oacute; su clave?</a>|
		<div class="registro">
			<?php $form=$this->beginWidget('CActiveForm', array(
				'id'=>'index-form',
				'enableClientValidation'=>false,
				'action'=>($model)?array('StkUsuario/Create'):Yii::app()->controller->createUrl('Create'),
				'clientOptions'=>array(
						'validateOnSubmit'=>false,
				),
				)); ?>
			
					<?php echo CHtml::submitButton('Resgistrarse',array('class'=>'registro', 'id'=>'registro', 'name'=>'registro')); ?>
					<?php $this->endWidget(); ?>
		</div>
	</div>-->

	<?php  $model_Banners = StkBanner::model()->findAll(array('order'=>'Orden', 'condition'=>'Estado != "E"'));?>
	
	<div class="slider-wrapper theme-default">
		<div id="slider" class="nivoSlider">
			<?php foreach($model_Banners as $i=>$banner) {?>
				<a href="#"><img src="images/banner/<?php echo $banner->Url;?>" alt="" title="<?php echo $banner->Nombre; ?>" /></a>
			<?php } ?>
		</div>
	</div>


	
	<div class="home-box">
	<h2>Servicios</h2>
		<img src="images/pic1.jpg" height="128" width="330" />
		<div class="home-box-content">
			<?php echo $servicios->Resumen;?>
			<p align="right" style="margin-bottom:0;">
			<?php
				echo CHtml::ajaxLink ("Leer m&aacute;s...","#",
                              //CController::createUrl('Productdetail',array('type'=>'GET','id'=>$datas->Id)), 
                             array('class'=>'links'),
							 $htmlOptions=array('data-reveal-id'=>'myModal', 'onclick'=>'Services()'),
							 array('onclick'=>$_titulo_serv="Servicios", $_texto_serv=$servicios->Texto)
							);
			?>
			
			<!--<a href="#" class="links">Leer m&aacute;s... </a>--> </p>
		</div>
	</div>

	
	
	<div class="home-box">
		<h2>Productos</h2>
		<img src="images/pic2.jpg" height="128" width="330" />
		<div class="home-box-content">
			<?php echo $productos->Resumen;?>
			<p align="right" style="margin-bottom:0;">
			
			<?php
			//$_SESSION["Titulo"]=$productos->Nombre;
			$_SESSION["Texto"]=$productos->Texto;
				echo CHtml::ajaxLink ("Leer m&aacute;s...","#",
                             // CController::createUrl('Productdetail',array('type'=>'GET','id'=>$datas->Id)), 
                             array('class'=>'links'),
							 $htmlOptions=array('data-reveal-id'=>'myModal2', 'id'=>'Productos', 'name'=>'productos'),
							 array('onclick'=>$_titulo_prod=$productos->Nombre, $_texto_prod=$productos->Texto)
							 );
			?> </p>
		</div>
	</div>

	<div class="home-box" style="margin-right:0;">
		<h2>Novedades</h2>
		<img src="images/pic3.jpg" height="128" width="330" />
		<div class="home-box-content">
			<?php  echo $novedades->Resumen;?>
			<p align="right" style="margin-bottom:0;">
			<?php
				echo CHtml::ajaxLink ("Leer m&aacute;s...","#",
                             array('class'=>'links'),
							
							 //CController::createUrl('Productdetail',array('id'=>$data->Id)), 
							 $htmlOptions=array('data-reveal-id'=>'myModal3', 'id'=>'Novedades', 'name'=>'novedades'),
							  array('onclick'=>$_titulo_nov=$novedades->Nombre, $_texto_nov=$novedades->Texto)
						);
			?>
			</p>
		</div>
	</div>
	<div id="myModal" class="reveal-modal">
		<h1 id="Titulo_Producto"> <?php echo $_titulo_serv; ?></h1>
		<p><?php echo $_texto_serv; ?></p>
		<a class="close-reveal-modal">&#215;</a>
	</div>
	<div id="myModal2" class="reveal-modal">
		<h1 id="Titulo_Producto"> <?php echo $_titulo_prod; ?></h1>
		<p><?php echo $_texto_prod; ?></p>
		<a class="close-reveal-modal">&#215;</a>
	</div>
	<div id="myModal3" class="reveal-modal">
		<h1 id="Titulo_Producto"> <?php echo $_titulo_nov; ?></h1>
		<p><?php echo $_titulo_nov; ?></p>
		<a class="close-reveal-modal">&#215;</a>
	</div>

</div>